#ifndef LOGIC_H
#define LOGIC_H

#include "Parser.h"
#include "allCommandStack.h"
#include "LogicProcess.h"
#include "DeleteProcess.h"
#include "AddProcess.h"
#include "allTaskList.h"
#include "UpdateProcess.h"
#include <string>
#include <iostream>
using namespace std;
//enum commandType{Add,Delete,Edit,Update,Undo,Redo,Search,Select,Exit};


class Logic{
protected:
	string commandString;
	//commandType cmdtype;
	LogicProcess *processor;
	allTaskList allTask;
	allCommandStack allCmdStack;
	Parser pass;
	TaskList resultList;
public:
	Logic();
	Logic(string command);
	~Logic();
	void getCommand(string command);
	LogicProcess* getProcessor();
	allTaskList getAllTask();
	void setCommandString(string cmdStr);

	void processCommand();
	TaskList getResultList();
	/*string takeContent(string commandString,string command);
	void solveTheCommand(commandType type,string content);
	string takeFirstWord(string tmp);
	commandType detectCommandType(string command);*/
	
	
};
#endif